package binary;

public class BinaryDemo {
    public static void main(String[] args) {

        int n=45;
        System.out.println(Integer.toBinaryString(n));
        System.out.println(n);

        n++;
        System.out.println(Integer.toBinaryString(n));
        System.out.println(n);
        //8421 8421 8421 8421 8421 8421
        //0100 0111 1011 1001 1000 1010
        //  4   7    B    9    8     A

        //8421 8421 8421 8421 8421 8421
        //0010 1001 1011 0110 0011 0101
        // 2     9   B    6    3     5

        //8421 8421 8421 8421 8421 8421
        //1000 1111 0011 0101 1000 1001
        // 8    F    3    5     8    9

        //8421 8421 8421 8421 8421 8421 8424
        //0001 1100 0111 0100 0110 0000 1111
        //  1   C    7    4    6    0    F
    }
}
